button_a — Onboard Button A

The main functionality and function of the button_a module

Function

button_a.is_pressed()

Get the current state of button A. The result returned is True: the button is pressed, or the False: button is not pressed.

Sample Code:

import codey

def loop():
    while True:
        if codey.button_a.is_pressed():
            print("button A is pressed")
loop()